﻿using HandyControl.Tools;
using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;

namespace SlamDunk.MES.DataDrive.Client.Converters
{
    public class SystemMenuColorBrushConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var colorBrush = ResourceHelper.GetResource<Brush>(value?.ToString() ?? "SuccessBrush");
            return colorBrush;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
